/* 基础重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

/* 隐藏样式 */
.hidden {
    display: none !important;
}

/* 容器和卡片样式 */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin: 20px;
}

.header {
    background: #3b82f6;
    color: white;
    padding: 25px 20px;
    text-align: center;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

/* 表单容器 */
.form-container {
    padding: 0px 30px;
    overflow: visible;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4b5563;
    font-size: 14px;
}

input, textarea, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 按钮样式 */
.btn {
    padding: 14px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
   /* margin-top: 10px;*/
    text-align: center;
    display: inline-block;
    text-decoration: none;
   /* line-height: 1;*/
}

.btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: transparent;
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

.btn-outline:hover {
    background: #3b82f6;
    color: white;
}

.btn-danger {
    background: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
}

/* 消息样式 */
.message {
    padding: 12px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.message.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 配置信息样式 */
.config-info {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 15px;
    margin: 20px;
    font-size: 14px;
}

.config-info h3 {
    color: #d97706;
    margin-bottom: 8px;
}

.config-info p {
    margin-bottom: 5px;
    color: #92400e;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
    border-top: 1px solid #e5e7eb;
}

/* 安全提示 */
.security-tips {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    font-size: 14px;
    color: #0369a1;
}

.security-tips h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.security-tips ul {
    margin: 0;
    padding-left: 20px;
}

.security-tips li {
    margin-bottom: 4px;
}

/* 链接样式 */
.auth-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.auth-link p {
    color: #6b7280;
}

.auth-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.auth-link a:hover {
    text-decoration: underline;
    color: #2563eb;
}

/* 用户信息样式 */
.user-info {
    padding: 0;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        margin: 10px;
    }
    
    .card {
        margin: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 5px;
    }
    
    .card {
        margin: 5px;
        border-radius: 8px;
    }
    
    .form-container {
        padding: 15px;
    }
    
    .btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .header {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    input, textarea, select {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding: 15px 10px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .form-container {
        padding: 10px;
    }
    
    .btn {
        padding: 10px;
        font-size: 14px;
    }
    
    .message {
        font-size: 13px;
        padding: 10px;
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 选择文本样式 */
::selection {
    background: #3b82f6;
    color: white;
}

::-moz-selection {
    background: #3b82f6;
    color: white;
}